<tc_include file="Public:head" />
<body class="body-white" id="top">
<div class="container tc-main">
  <ul class="nav nav-tabs">
  <li class="active"><a href="{:U('game/expert')}">专业比赛</a></li>
  <li><a href="{:U('game/amateur')}">业余比赛</a></li>
  </ul>
		<div class="p10"><div class="pages"> {$Page} </div> </div><br>
 		<table class="table table-bordered table-striped table-hover">
		 <thead>
		<tr>
		  <th style="min-width: 120px;">对战球队</th>
		  <th style="min-width: 75px;">开赛时间</th>
		  <th style="min-width: 55px;">操作</th>
		</tr>
		 </thead>
		 <tbody>
		 <foreach name="lists" item="vo">
		<tr>
		  <td>
	  		<foreach name="teams" item="team">
				<if condition="$team['constid'] eq $vo['teamid1'] || $team['teamnumber'] eq $vo['teamid1']">
		  			{$team.teamname} 
		  		</if>
	 		</foreach>
	 		:
	  		<foreach name="teams" item="team">
				<if condition="$team['constid'] eq $vo['teamid2'] || $team['teamnumber'] eq $vo['teamid2']">
		  			 {$team.teamname}
		  		</if>
	 		</foreach>
		  </td>
		  <td>{$vo.matchdatetime}</td>
		  <td>
		  	<php>
		  		$stattime = $vo['matchdatetime'] ;
		  		$endtime = date("Y-m-d H:i:s",strtotime("$stattime +1hours"));
		  		if($endtime < date("Y-m-d H:i:s")){
		  		</php>
		  			<a href="{:U('game/edit',array('id'=>$vo['id']))}">更新比分</a>
		  		<php>
		  		}else{
		  			echo "比赛正在进行";
		  		}
		  	</php>
		  </td>
		</tr>
		 </foreach>
		 </tbody>
		  </table>
		<div class="p10"><div class="pages"> {$Page} </div> </div>
</div>
	<tc_include file="Public:footer" />
</body>
</html>